<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<BreukenWebsite.Models.Leerling>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Leerlingbeheer
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript">
        $(document).ready(function() {
            $("#myTable").tablesorter();
        });
    </script>
    <h2>Leerlingbeheer</h2>

    <table id="myTable" class="tablesorter">
    <thead>
        <tr>
            <th>
                #
            </th>
            <th>
                Naam
            </th>
            <th>
                Klas
            </th>
            <th>
                Edit
            </th>
            <th>
                Details
            </th>
        </tr>
    </thead>
    <tbody>
    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%= Html.Encode(item.leerlingID) %>
            </td>
            <td>
                <%= Html.Encode(item.naam) %>
            </td>
            <td>
                <%= Html.Encode(item.klas) %>
            </td>
            <td>
                <%= Html.ActionLink("_IMG_", "Edit", new { id = item.leerlingID }).Replace("_IMG_", "<img alt=\"Edit\" src=\"../../Content/icons/notes_edit.png\"/>")%>
            </td>
            <td>
                <%= Html.ActionLink("_IMG_", "Details", new { id = item.leerlingID }).Replace("_IMG_", "<img alt=\"Details\" src=\"../../Content/icons/search.png\"/>")%>
            </td>
        </tr>
    
    <% } %>
    </tbody>
    </table>

</asp:Content>

